package cn.lx;

/**
 * @author lixin
 * @Classname Client
 * @Description TODO
 * @Date 2019/10/8 下午4:28
 */
public class Client {
    public static void main(String[] args) {
        // 声明出容器
        Aggregate aggregate = new ConcreteAggregate();
        aggregate.add("abc1");
        aggregate.add("abc2");
        aggregate.add("abc3");

        Iterator iterator = aggregate.iterator();
        while (iterator.hasNext()) {
            System.out.println(iterator.next());
        }
    }
}
